
package com.ebupt.migu.globalpopup.enums;
import lombok.Getter;


/**
 * 条件参数枚举

 */
@Getter
public enum ConditionEnum {

	/**
	 * 设备id
	 */
	DEVICE_ID(1,1,"deviceId"),
	/**
	 * 操作系统
	 */
	OS(1,2,"os"),
	/**
	 * 操作系统版本
	 */
	OS_VERSION(1,3,"osVersion"),
	/**
	 * ios -idfa
	 */
	IDFA(1,4,"idfa"),
	/**
	 * 广告id，匿名设备标识符
	 */
	OAID(1,6,"OAID"),
	/**
	 * 手机品牌
	 */
	BRAND(1,7,"brand"),
	/**
	 * ua
	 */
	UA(1,8,"ua"),
	/**
	 * uid
	 */
	UID(2,1,"uid"),
	/**
	 * 用户手机
	 */
	MSISDN(2,2,"msisdn"),
	/**
	 * version(版本号)
	 */
	VERSION(3,1,"version"),
	/**
	 * 运营商
	 */
	MGM_NETWORK_OPERATORS(13,1,"mgm-network-operators"),
	/**
	 * 运营商
	 */
	OLD_MGM_NETWORK_OPERATORS(4,1,"mgm-network-operators"),
	/**
	 * 省份
	 */
	adCode(4,2,"adCode"),
	/**
	 * 城市
	 */
	cityCode(4,3,"cityCode"),
	/**
	 * ip地理位置
	 */
	longitude(4,4,"longitude+latitude"),
	/**
	 * 设备ip
	 */
	ip(4,5,"ip"),
	/**
	 * 渠道标签
	 */
	CHANNEL1(5,1,"channel"),
	CHANNEL2(5,2,"channel"),
	CHANNEL3(5,3,"channel"),
	CHANNEL4(5,4,"channel"),
	/**
	 * 网络环境
	 */
	MGM_NETWORK_STANDARD1(7,1,"mgm-Network-standard"),
	MGM_NETWORK_STANDARD2(7,2,"mgm-Network-standard"),
	MGM_NETWORK_STANDARD3(7,3,"mgm-Network-standard"),
	MGM_NETWORK_STANDARD4(7,4,"mgm-Network-standard"),
	MGM_NETWORK_STANDARD5(7,5,"mgm-Network-standard"),
	/**
	 * 会员身份
	 */
	MEMBERLEVEL1(8,1,"memberLevel"),
	MEMBERLEVEL2(8,2,"memberLevel"),
	MEMBERLEVEL3(8,3,"memberLevel"),
	MEMBERLEVEL4(8,4,"memberLevel"),
	MEMBERLEVEL5(8,5,"memberLevel"),
	MEMBERLEVEL6(8,6,"memberLevel"),
	MEMBERLEVEL7(8,7,"memberLevel"),
	MEMBERLEVEL8(8,8,"memberLevel"),
	MEMBERLEVEL9(8,9,"memberLevel"),
	MEMBERLEVEL10(8,10,"memberLevel"),
	MEMBERLEVEL11(8,11,"memberLevel"),
	MEMBERLEVEL12(8,12,"memberLevel"),
	MEMBERLEVEL13(8,13,"memberLevel"),
	MEMBERLEVEL14(8,14,"memberLevel"),
	MEMBERLEVEL15(8,15,"memberLevel"),
	MEMBERLEVEL16(8,16,"memberLevel"),
	MEMBERLEVEL17(8,17,"memberLevel"),
	MEMBERLEVEL18(8,18,"memberLevel"),
	MEMBERLEVEL19(8,19,"memberLevel"),
	MEMBERLEVEL20(8,20,"memberLevel"),
	LISTEN_ENERGIZE(8, 21, "memberLevel"),
	PLATINUM_LISTEN_EXPERIENCE(8, 22, "memberLevel"),
	CONSTELLATION_M_VIP(8, 23, "memberLevel"),

	/**
	 * 达人
	 */
	TYPE(9,1,"memberTypes"),

	/**
	 * 成长等级
	 */
	LEVEL(10,1,"level"),

	/**
	 * 达人
	 */
	SUBTYPE(11,1,"memberTypes");


	final int propertyCode;
	final int conditionKey;
	final String value;

	ConditionEnum(int propertyCode,int conditionKey, String value){
		this.propertyCode=propertyCode;
		this.conditionKey=conditionKey;
		this.value=value;
	}

	public static String getKeyValue(int propertyCode,int conditionKey){
		for (ConditionEnum v: values()) {
			if(v.getPropertyCode()==propertyCode && v.getConditionKey()==conditionKey){
				return v.getValue();
			}
		}
		return null;
	}
}
